//
//  AutobotsCommonParamsGenerator.m
//  AutobotsPlugin
//
//  Created by 张志恒 on 16/9/21.
//  Copyright © 2016年 Autohome. All rights reserved.
//

#import "ABSCommonParamsGenerator.h"
#import "ABSUserContext.h"
#import "ABSAppContext.h"

@implementation ABSCommonParamsGenerator

static __inline__ __attribute__((always_inline)) NSString* IsvalidString(NSString *astring){
    if (!astring) {
        astring = @"";
    }
    return astring;
}

#pragma mark - ABCommonParamsProtocal
- (NSDictionary *)commonParamsDictionary
{
    return @{@"app": @"IOS",
             @"sid": IsvalidString([ABSUserContext sharedInstance].sessionId),
             @"n": IsvalidString([ABSUserContext sharedInstance].uuid),
             @"empId": IsvalidString([ABSUserContext sharedInstance].empId),
             @"uk": IsvalidString([ABSUserContext sharedInstance].userKey),
             @"version": IsvalidString([ABSAppContext sharedInstance].appVersion)};
}

@end
